package com.tl.libmanager;

import android.app.Activity;
import android.content.Intent;
import android.os.Message;

import java.util.HashMap;

/**
 * Created by Administrator on 2017/7/26 0026.
 */

public interface PayEntrance {
//    /**
//     * 农行支付
//     *
//     * @param context 上下文
//     * @param tokenID 支付订单号
//     */
//    void payABC(Activity context, String tokenID);
//
//    /**
//     * 获取农行支付结果（一般在调用农行支付的Activity#onResume()方法中获取
//     *
//     * @param intent
//     * @return 是否处理完成
//     */
//    boolean payABCResult(Intent intent, PayListener payListener);
//
//    void payWX(Activity activity, String partnerId, String prepayId, String nonceStr, String timeStamp, String sign);

    void payAli(Activity activity, String orderInfo, OnPayResultListener payListener);

    void payWX(Activity activity, String orderInfo, OnPayResultListener payListener);

    abstract class PayListener {
        public abstract void onSuccess(int type);

        public abstract void onFailed(int type, String message, String code);

        public void startPay(int type) {

        }

        public void onPaying(int type) {
        }

    }

    interface OnPayResultListener {
        public void onPaySuccess(int payWay, Message message);

        public void onPayFailed(int payWay, String code, String message);
    }
}
